|
Eclipse Platform Pre-release 3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.team.core.subscribers.SyncInfo
Describes the relative synchronization of a remote resource and a local resource using a base resource for comparison.
Differences between the base and local resources are classified as outgoing changes; if there is a difference, the local resource is considered the outgoing resource.
Differences between the base and remote resources are classified as incoming changes; if there is a difference, the remote resource is considered the incoming resource.
Differences between the local and remote resources determine the sync status. The sync status does not take into account the common resource.
Note that under this parse of the world, a resource can have both incoming and outgoing changes at the same time, but may nevertheless be in sync!
[Issue: "Gender changes" are also an interesting aspect... ]
Field Summary | |
static int |
ADDITION
Sync constant (value 1) indicating that one side was added. |
static int |
AUTOMERGE_CONFLICT
Sync constant (value 32) indicating that both the local and remote resources have changed relative to the base but their content changes do not conflict (e.g. |
static int |
CHANGE
Sync constant (value 3) indicating that one side was changed. |
static int |
CHANGE_MASK
Bit mask for extracting the change type. |
static int |
CONFLICTING
Sync constant (value 12) indicating a change to both the remote and local resources. |
static int |
DELETION
Sync constant (value 2) indicating that one side was deleted. |
static int |
DIRECTION_MASK
Bit mask for extracting the synchronization direction. |
static int |
IN_SYNC
Sync constant (value 0) indicating element is in sync. |
static int |
INCOMING
Sync constant (value 8) indicating a change to the remote resource. |
static int |
MANUAL_CONFLICT
Sync constant (value 64) indicating that both the local and remote resources have changed relative to the base and their content changes conflict (e.g. |
static int |
OUTGOING
Sync constant (value 4) indicating a change to the local resource. |
static int |
PSEUDO_CONFLICT
Sync constant (value 16) indication that both the local and remote resources have changed relative to the base but their contents are the same. |
Constructor Summary | |
SyncInfo(IResource local,
IRemoteResource base,
IRemoteResource remote,
TeamSubscriber subscriber,
IProgressMonitor monitor)
Construct a sync info object. |
Method Summary | |
protected int |
calculateKind(IProgressMonitor progress)
|
boolean |
equals(Object other)
|
Object |
getAdapter(Class adapter)
Returns an object which is an instance of the given class associated with this object. |
IRemoteResource |
getBase()
Returns the remote resource handle for the base resource, or null if the base resource does not exist. |
static int |
getChange(int kind)
|
static int |
getDirection(int kind)
|
int |
getKind()
Returns the kind of synchronization for this node. |
IResource |
getLocal()
Returns the state of the local resource. |
String |
getLocalContentIdentifier()
Returns the content identifier for the local resource or null if
it doesn't have one. |
IRemoteResource |
getRemote()
Returns the handle for the remote resource, or null if the remote resource does not exist. |
TeamSubscriber |
getSubscriber()
Returns the subscriber that created and maintains this sync info object. |
static boolean |
isInSync(int kind)
|
static String |
kindToString(int kind)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int IN_SYNC
public static final int ADDITION
public static final int DELETION
public static final int CHANGE
public static final int CHANGE_MASK
public static final int OUTGOING
public static final int INCOMING
public static final int CONFLICTING
public static final int DIRECTION_MASK
public static final int PSEUDO_CONFLICT
public static final int AUTOMERGE_CONFLICT
public static final int MANUAL_CONFLICT
Constructor Detail |
public SyncInfo(IResource local, IRemoteResource base, IRemoteResource remote, TeamSubscriber subscriber, IProgressMonitor monitor) throws TeamException
Method Detail |
public IResource getLocal()
public String getLocalContentIdentifier()
null
if
it doesn't have one. For example, in CVS this would be the revision number.
public IRemoteResource getBase()
null
if the base resource does not exist.
[Note: The type of the common resource may be different from the types of the local and remote resources. ]
null
public IRemoteResource getRemote()
null
if the remote resource does not exist.
[Note: The type of the remote resource may be different from the types of the local and common resources. ]
null
public TeamSubscriber getSubscriber()
public int getKind()
public static boolean isInSync(int kind)
public static int getDirection(int kind)
public static int getChange(int kind)
public boolean equals(Object other)
public Object getAdapter(Class adapter)
IAdaptable
null
if
no such object can be found.
getAdapter
in interface IAdaptable
adapter
- the adapter class to look up
null
if this object does not
have an adapter for the given classpublic String toString()
public static String kindToString(int kind)
protected int calculateKind(IProgressMonitor progress) throws TeamException
TeamException
|
Eclipse Platform Pre-release 3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |